#include "PhysicsFloor.h"



void PhysicsFloor::CreateGeometry()
{
	// D3DShape
	GameGeometry* floor = new D3DXCube(dimentions.x,dimentions.y,dimentions.z);
	floor->SetColor(0,0,1);
	Geometry.push_back(floor);
}

void PhysicsFloor::CreatePhysicsObject()
{
	// Havok shape
	hkVector4 groundRadii( dimentions.x/2, dimentions.y/2, dimentions.z/2 );
	havokShape = new hkpBoxShape( groundRadii , 0 );

	bodyInfo.m_shape = havokShape;
	bodyInfo.m_motionType = hkpMotion::MOTION_KEYFRAMED;
	bodyInfo.m_position = hkVector4(Position.x,Position.y-(dimentions.y/2),Position.z,0);
	//ci.m_qualityType = HK_COLLIDABLE_QUALITY_KEYFRAMED;

	havokRigidBody = new hkpRigidBody( bodyInfo ) ;
}


